import tables
import codecs
from datetime import datetime

h5f = tables.open_file('database_name.h5', 'w')

transaction = {
    'timestamp': tables.Time64Col(),
    'volume': tables.Int64Col(),
    'price': tables.Float64Col(),
    'isBuy': tables.BoolCol()
}

tbl = h5f.create_table('/', 'table_name', transaction)

row = tbl.row

for line in codecs.open('2017-09-25.csv', 'r', 'utf8'):
    print(line.split(','))
    # row['timestamp'] = value1
    # row.append()

h5f.close()
['sh600857', '宁波中百', '0.000', '12.660', '12.660', '0.000', '0.000', '0.000', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '0', '0.000', '2017-09-25', '09:13:45', '00\n']